package com.week2.day02;

public class Son extends Father {
    private int num;

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public Son() {
        super();
    }

    public void write2() {
        System.out.println("子类独有的方法");
    }

    @Override
    public void write(Father father) {
        super.write(father);
        System.out.println("子类重写的方法");
    }
}
